package com.jiazhong.spring.ioc.讲之前的内容.b;

public class DemoA {

    private String name;
    private int age = (int) (Math.random() * 100 + 1);

    public DemoA(String name) {
        this.name = name;
    }

    public void sleep() {
        System.out.println(name + "今年" + age + "岁，准备睡觉呀");
    }
}
